
#ifndef __VEDA_MUTEX_H__
#define __VEDA_MUTEX_H__

#ifdef VEDA_OS_LINUX
#include <pthread.h>
#endif
#ifdef VEDA_OS_WIN32
#include <Windows.h>
#endif

#include "VInfra/VDefine.h"
#include "VInfra/VMutex.h"

namespace Veda{

class InnerVMutex
{
V_INNERCLASS(InnerVMutex)
	friend class VMutex;
	friend class VRecMutex;
	friend class VSpinMutex;
	friend class VRWMutex;
	friend class VChkMutex;
	
#ifdef VEDA_OS_LINUX
	union{
		pthread_mutex_t ein;
		pthread_spinlock_t zwei;
		pthread_rwlock_t drei;
	}m_mtx;
#endif
#ifdef VEDA_OS_WIN32
		CRITICAL_SECTION m_mtx;
		volatile LONG m_count;
#endif
};

}

#endif

